﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AFSharedLibrary.Wizards;
using AFSharedLibrary;

namespace UIDesigner.Designers.Controls
{
    public class ctrlWizPanelButtonOptions : ctrlWizFrameBase
    {
        private ctrlCreateNewWizard m_ctrlContainer;

        #region " Windows Form Designer generated code "

        public ctrlWizPanelButtonOptions()
        {
            //This call is required by the Windows Form Designer.
            InitializeComponent();
        }

        //Form overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (!(components == null))
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        private Label lblHeader;
        private GroupBox groupBox1;
        private FlowLayoutPanel flowLayoutPanel1;
        public RadioButton optButton;
        public RadioButton optLink;
        private TableLayoutPanel tableLayoutPanel1;
        private Label label1;
        public TextBox txtButtonText;

        //Required by the Windows Form Designer
        private System.ComponentModel.IContainer components;

        //NOTE: The following procedure is required by the Windows Form Designer
        //It can be modified using the Windows Form Designer.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.lblHeader = new System.Windows.Forms.Label();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
            this.optButton = new System.Windows.Forms.RadioButton();
            this.optLink = new System.Windows.Forms.RadioButton();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.txtButtonText = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.groupBox1.SuspendLayout();
            this.flowLayoutPanel1.SuspendLayout();
            this.tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // lblHeader
            // 
            this.lblHeader.Dock = System.Windows.Forms.DockStyle.Top;
            this.lblHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblHeader.ForeColor = System.Drawing.Color.Navy;
            this.lblHeader.Location = new System.Drawing.Point(0, 0);
            this.lblHeader.Name = "lblHeader";
            this.lblHeader.Size = new System.Drawing.Size(310, 18);
            this.lblHeader.TabIndex = 0;
            this.lblHeader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // groupBox1
            // 
            this.groupBox1.AutoSize = true;
            this.groupBox1.Controls.Add(this.flowLayoutPanel1);
            this.groupBox1.Location = new System.Drawing.Point(12, 21);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(160, 66);
            this.groupBox1.TabIndex = 2;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Create \"New\" Button Option";
            // 
            // flowLayoutPanel1
            // 
            this.flowLayoutPanel1.AutoSize = true;
            this.flowLayoutPanel1.Controls.Add(this.optButton);
            this.flowLayoutPanel1.Controls.Add(this.optLink);
            this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 16);
            this.flowLayoutPanel1.Name = "flowLayoutPanel1";
            this.flowLayoutPanel1.Size = new System.Drawing.Size(154, 47);
            this.flowLayoutPanel1.TabIndex = 1;
            // 
            // optButton
            // 
            this.optButton.AutoSize = true;
            this.optButton.Checked = true;
            this.optButton.Location = new System.Drawing.Point(3, 3);
            this.optButton.Name = "optButton";
            this.optButton.Size = new System.Drawing.Size(56, 17);
            this.optButton.TabIndex = 0;
            this.optButton.TabStop = true;
            this.optButton.Text = "Button";
            this.optButton.UseVisualStyleBackColor = true;
            // 
            // optLink
            // 
            this.optLink.AutoSize = true;
            this.optLink.Location = new System.Drawing.Point(3, 26);
            this.optLink.Name = "optLink";
            this.optLink.Size = new System.Drawing.Size(45, 17);
            this.optLink.TabIndex = 0;
            this.optLink.Text = "Link";
            this.optLink.UseVisualStyleBackColor = true;
            // 
            // tableLayoutPanel1
            // 
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.51007F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 73.48993F));
            this.tableLayoutPanel1.Controls.Add(this.txtButtonText, 1, 0);
            this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
            this.tableLayoutPanel1.Location = new System.Drawing.Point(9, 93);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 1;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(298, 30);
            this.tableLayoutPanel1.TabIndex = 3;
            // 
            // txtButtonText
            // 
            this.txtButtonText.Location = new System.Drawing.Point(82, 3);
            this.txtButtonText.Name = "txtButtonText";
            this.txtButtonText.Size = new System.Drawing.Size(191, 20);
            this.txtButtonText.TabIndex = 1;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 4);
            this.label1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(65, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Button Text:";
            // 
            // ctrlWizPanelButtonOptions
            // 
            this.BackColor = System.Drawing.SystemColors.Control;
            this.Controls.Add(this.tableLayoutPanel1);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.lblHeader);
            this.Name = "ctrlWizPanelButtonOptions";
            this.Size = new System.Drawing.Size(310, 266);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.flowLayoutPanel1.ResumeLayout(false);
            this.flowLayoutPanel1.PerformLayout();
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        #endregion

        public ctrlWizPanelButtonOptions(ctrlWizFrameBase ctrlPrevious, IWizardFrameContainer objContainer) : base(ctrlPrevious, objContainer)
        {
            Construct objConstruct;

            InitializeComponent();

            m_ctrlContainer = (ctrlCreateNewWizard)objContainer;
            objConstruct = m_ctrlContainer.BusinessObject;

            lblHeader.Text = "Create \"New\" Button";

            txtButtonText.Text = "Create New " + objConstruct.Name; 
        }

        public override string Caption
        {
            get
            {
                return "Button Options";
            }
        }

        public override System.Drawing.Image Image
        {
            get
            {
                return null;
            }
        }

        public override ctrlWizFrameBase GetNextFrame(ctrlWizFrameBase ctrlPrevious)
        {
            return this.PreviousFrame.GetNextFrame(ctrlPrevious);
        }
    }

}
